<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	  <script type="text/javascript">
	  document.write('<table border="1">')
      for (var i = 1; i <= 9; i++){
        document.write('<tr>')
        for (var j = 1; j <= i; j++){
          document.write('<td>')
          document.write(i+'*'+j+'='+(i*j));
          document.write('</td>')
        }
        document.write('</tr>')
      }
      document.write('</table>')
	  
	  document.write('<hr />');
	  
	  document.write('<table border="1">')
      for (var i = 9; i >= 1; i--){
        document.write('<tr>')
        for (var j = 1; j <= i; j++){
          document.write('<td>')
          document.write(i+'*'+j+'='+(i*j));
          document.write('</td>')
        }
        document.write('</tr>')
      }
      document.write('</table>')
      
      document.write('<hr />');
      
      document.write('<table border="1">')
      for (var i = 1; i <= 9; i++){
        document.write('<tr>')
        for (var j = 9; j > i; j--){
          document.write('<td>')
          document.write('</td>')
        }
        for (var k = 1; k <= i; k++) {
        	document.write('<td>')
          document.write(i+'*'+j+'='+(i*j));
          document.write('</td>')
        }
        document.write('</tr>')
      }
      document.write('</table>')

      document.write('<hr />');

      document.write('<table border="1">')
      for (var i = 9; i >= 1; i--){
        document.write('<tr>')
        for (var j = 9; j > i; j--){
          document.write('<td>')
          document.write('</td>')
        }
        for (var k = 1; k <= i; k++) {
          document.write('<td>')
          document.write(i+'*'+j+'='+(i*j));
          document.write('</td>')
        }
        document.write('</tr>')
      }
      document.write('</table>')
	  </script>
	</body>
</html>
